import request from '@/utils/request'

const headers = { 'Content-Type': 'application/x-www-form-urlencoded' }

export const loginService = (data) => {
    return request.post('/api/user/login', data, {headers})
}

export const registerService = (data) => {
    return request.post('/api/user/register', data, {headers:headers})
}

export const modifyPasswordService = (data) => {
    return request.post('/api/user/modify/password', data, {headers:headers})
}

export const getUserInfoService = () => {
    return request.get('/api/user/getUser')
}

export const updateUserService = (data) => {
    return request.post('/api/user/update', data)
}

export const getUserListService = (params) => {
    return request.get('/api/user/getUser/list', {params})
}

export const initUserPasswordService = (data) => {
    return request.post('/api/user/init/password', data, {headers:headers})
}